<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>react 练习part09</title>
		<script src="../build/react.js"></script>
		<script src="../build/react-dom.js"></script>
		<script src="../build/browser.min.js"></script>
	</head>
	<body>
		<div id="app"></div>
		<script type="text/babel">
			var Input = React.createClass({
				getInitialState:function(){
					return {value:'Hello'}
				},
				handleChange:function(event){
					this.setState({value:event.target.value})	
				},
				render:function(){
					var value = this.state.value;
					return (
						<div>
							<input type="text" value={value} onChange={this.handleChange}/>
							<p>{value}</p>
						</div>
					)
				}
			})
			
			ReactDOM.render(
				<Input />,
				document.getElementById('app')
			)
		</script>
	</body>
</html>
